home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- ** **
- ** Module: QD3DWinViewer.h **
- ** **
- ** Purpose: WinViewer Controller Interface File. **
- ** **
- ** Copyright (C) 1996 Apple Computer, Inc. All rights reserved. **
- ** **
- *****************************************************************************/
-
- #ifndef QD3DWinViewer_h
- #define QD3DWinViewer_h
-
- #include "QD3D.h"
- #include "QD3DGroup.h"
-
- #if defined(OS_WINDOWS) && OS_WINDOWS
-
- #include <windows.h>
-
- typedef void *TQ3WinViewerObject;
-
-
- typedef TQ3Status (*TQ3WinViewerDrawingCallbackMethod)(
-
- TQ3WinViewerObject theViewer,
-
- const void *data);
-
-
- enum {
- kQ3ViewerShowBadge = 1<<0,
- kQ3ViewerActive = 1<<1,
- kQ3ViewerControllerVisible = 1<<2,
- kQ3ViewerDrawFrame = 1<<3,
- kQ3ViewerDraggingOff = 1<<4,
-
- kQ3ViewerButtonCamera = 1<<5,
- kQ3ViewerButtonTruck = 1<<6,
- kQ3ViewerButtonOrbit = 1<<7,
- kQ3ViewerButtonZoom = 1<<8,
- kQ3ViewerButtonDolly = 1<<9,
- kQ3ViewerButtonReset = 1<<10,
-
-
-
- kQ3ViewerOutputTextMode = 1<<11,
-
- kQ3ViewerDragMode = 1<<12,
-
-
-
- kQ3ViewerDrawGrowBox = 1<<13,
-
- kQ3ViewerDrawDragBorder = 1<<14,
-
-
- kQ3ViewerDraggingInOff = 1<<15,
-
- kQ3ViewerDraggingOutOff = 1<<16,
-
-
-
- kQ3ViewerDefault = 1<<31
- };
-
-
-
-
- enum {
-
- kQ3ViewerEmpty = 0,
-
- kQ3ViewerHasModel = 1<<0,
-
- kQ3ViewerHasUndo = 1<<1
-
- };
-
-
-
- typedef enum TQ3ViewerCameraView {
-
- kQ3ViewerCameraRestore,
-
- kQ3ViewerCameraFit,
-
- kQ3ViewerCameraFront,
-
- kQ3ViewerCameraBack,
-
- kQ3ViewerCameraLeft,
-
- kQ3ViewerCameraRight,
-
- kQ3ViewerCameraTop,
-
- kQ3ViewerCameraBottom
-
- } TQ3ViewerCameraView;
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
-
- /******************************************************************************
- ** **
- ** Creation and destruction **
- ** Note that this is not a QuickDraw 3D object **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3WinViewerObject Q3WinViewerNew(
- HWND window,
- const RECT *rectangle,
- unsigned long flags);
-
- QD3D_EXPORT TQ3Status Q3WinViewerDispose(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Functions to attach data to a WinViewer **
- ** **
- *****************************************************************************/
- QD3D_EXPORT TQ3Status Q3WinViewerUseFile(
- TQ3WinViewerObject theWinViewer,
- HANDLE fileHandle);
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerUseUnixFile (
-
- TQ3WinViewerObject theWinViewer,
-
- FILE *file); /* temporary until we
-
- have a win storage */
-
- QD3D_EXPORT TQ3Status Q3WinViewerUseData(
- TQ3WinViewerObject theWinViewer,
- void *data,
- unsigned long size);
-
- /******************************************************************************
- ** **
- ** Functions to write data out from the WinViewer **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerWriteFile(
- TQ3WinViewerObject theWinViewer,
- HANDLE fileHandle);
-
- QD3D_EXPORT unsigned long Q3WinViewerWriteData(
- TQ3WinViewerObject theWinViewer,
- void **data);
-
- /******************************************************************************
- ** **
- ** Use this function to force the WinViewer to re-draw **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerDraw(
- TQ3WinViewerObject theWinViewer);
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerDrawContent(
-
- TQ3WinViewerObject theViewer);
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerDrawControlStrip(
-
- TQ3WinViewerObject theViewer);
-
-
-
- /******************************************************************************
- ** **
- ** Function used by the WinViewer to filter and handle events **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerMouseDown(
- TQ3WinViewerObject theWinViewer,
- long x,
- long y);
-
- QD3D_EXPORT TQ3Status Q3WinViewerContinueTracking(
- TQ3WinViewerObject theWinViewer,
- long x,
- long y);
-
- QD3D_EXPORT TQ3Status Q3WinViewerMouseUp(
- TQ3WinViewerObject theWinViewer,
- long x,
- long y);
-
- /* TBD: Re-parameterize using params from WM_CHAR and WM_KEYDOWN, WM_KEYUP
-
- QD3D_EXPORT TQ3Status Q3WinViewerKeyDown(
- TQ3WinViewerObject theWinViewer,
- unsigned char keyCode,
- unsigned short characterCode,
- unsigned short flags);
-
- QD3D_EXPORT TQ3Status Q3WinViewerKeyUp(
- TQ3WinViewerObject theWinViewer,
- unsigned char keyCode,
- unsigned short characterCode,
- unsigned short flags);
- */
-
- QD3D_EXPORT TQ3Status Q3WinViewerActivate(
- TQ3WinViewerObject theWinViewer);
-
- QD3D_EXPORT TQ3Status Q3WinViewerDeactivate(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** This function returns a Bitmap of the contents of the **
- ** WinViewer's window. The application should dispose the Bitmap. **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT HBITMAP Q3WinViewerGetBitmap(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Calls for dealing with Buttons **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerGetButtonRect(
- TQ3WinViewerObject theWinViewer,
- unsigned long button,
- RECT *rectangle);
-
- QD3D_EXPORT unsigned long Q3WinViewerGetCurrentButton(
- TQ3WinViewerObject theWinViewer);
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetCurrentButton(
- TQ3WinViewerObject theWinViewer,
- unsigned long button);
-
- /******************************************************************************
- ** **
- ** Functions to set/get the group to be displayed by the WinViewer. **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerUseGroup(
- TQ3WinViewerObject theWinViewer,
- TQ3GroupObject group);
-
- QD3D_EXPORT TQ3GroupObject Q3WinViewerGetGroup(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Functions to set/get the color used to clear the window **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetBackgroundColor(
- TQ3WinViewerObject theWinViewer,
- TQ3ColorARGB *color);
-
- QD3D_EXPORT TQ3Status Q3WinViewerGetBackgroundColor(
- TQ3WinViewerObject theWinViewer,
- TQ3ColorARGB *color);
-
- /******************************************************************************
- ** **
- ** Getting/Setting a WinViewer's View object. Disposal is needed. **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3ViewObject Q3WinViewerGetView(
- TQ3WinViewerObject theWinViewer);
-
- QD3D_EXPORT TQ3Status Q3WinViewerRestoreView(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Calls for setting/getting WinViewer flags **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetFlags(
- TQ3WinViewerObject theWinViewer,
- unsigned long flags);
-
- QD3D_EXPORT unsigned long Q3WinViewerGetFlags(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Calls related to bounds/dimensions. Bounds is the size of **
- ** the window. Dimensions can either be the Rect from the ViewHints **
- ** or the current dimensions of the window (if you do a Set). **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetBounds(
- TQ3WinViewerObject theWinViewer,
- RECT *bounds);
-
- QD3D_EXPORT TQ3Status Q3WinViewerGetBounds(
- TQ3WinViewerObject theWinViewer,
- RECT *bounds);
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetDimension(
-
- TQ3WinViewerObject theViewer,
-
- unsigned long width,
-
- unsigned long height);
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerGetDimension(
- TQ3WinViewerObject theWinViewer,
- unsigned long *width,
- unsigned long *height);
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerGetMininumDimension(
-
- TQ3WinViewerObject theViewer,
-
- unsigned long *width,
-
- unsigned long *height);
-
- /******************************************************************************
- ** **
- ** Window related calls **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetWindow(
- TQ3WinViewerObject theWinViewer,
- HWND aWindow);
-
- QD3D_EXPORT HWND Q3WinViewerGetWindow(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Adjust Cursor should be called from idle loop to allow the WinViewer **
- ** to change the cursor according to the cursor position/object under **
- ** the cursor. **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Boolean Q3WinViewerAdjustCursor(
- TQ3WinViewerObject theWinViewer,
- long x,
- long y);
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerCursorChanged(
-
- TQ3WinViewerObject theViewer);
-
-
- /******************************************************************************
- ** **
- ** Returns the state of the WinViewer. See the constant defined at the **
- ** top of this file. **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT unsigned long Q3WinViewerGetState(
- TQ3WinViewerObject theWinViewer);
-
- /******************************************************************************
- ** **
- ** Clipboard utilities **
- ** **
- *****************************************************************************/
-
- QD3D_EXPORT TQ3Status Q3WinViewerClear(
- TQ3WinViewerObject theWinViewer);
-
- QD3D_EXPORT TQ3Status Q3WinViewerCut(
- TQ3WinViewerObject theWinViewer);
-
- QD3D_EXPORT TQ3Status Q3WinViewerCopy(
- TQ3WinViewerObject theWinViewer);
-
- QD3D_EXPORT TQ3Status Q3WinViewerPaste(
- TQ3WinViewerObject theWinViewer);
-
-
- /******************************************************************************
-
- ** **
-
- ** Drawing CallBack **
-
- ** **
-
- *****************************************************************************/
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetDrawingCallbackMethod(
-
- TQ3WinViewerObject theViewer,
-
- TQ3WinViewerDrawingCallbackMethod callbackMethod,
-
- const void *data);
-
-
-
- /******************************************************************************
-
- ** **
-
- ** Undo **
-
- ** **
-
- *****************************************************************************/
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerUndo(
-
- TQ3WinViewerObject theViewer);
-
-
-
- TQ3Boolean Q3WinViewerGetUndoString(
-
- TQ3WinViewerObject theViewer,
-
- char *string,
-
- unsigned long *cnt);
-
-
-
- /******************************************************************************
-
- ** **
-
- ** New Camera Stuff **
-
- ** **
-
- *****************************************************************************/
-
-
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerGetCameraCnt(
-
- TQ3WinViewerObject theViewer,
-
- unsigned long *cnt);
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetCameraNumber(
-
- TQ3WinViewerObject theViewer,
-
- unsigned long cameraNo);
-
-
-
- QD3D_EXPORT TQ3Status Q3WinViewerSetCameraView(
-
- TQ3WinViewerObject theViewer,
-
- TQ3ViewerCameraView viewType);
-
-
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
-
- #endif /* OS_WINDOWS */
-
- #endif /* QD3DWinViewer_h */
-
-